#include <stdio.h>
#include <dlfcn.h>

#include "metanet_imp.h"
#include "metanet_malloc.h"


int 
main(int argc, char **argv) {
    struct metanet_config config;
    config.thread = 1;
    config.harbor = 1;
    config.module_path = "./service-lib/?.so";
    config.logger = "logger";
    config.logservice = "logger";
    config.bootstrap = "world/boot";
    config.daemon = "metanet.pid";

    // void *dl = dlopen("./service-lib/logger.so", RTLD_NOW | RTLD_GLOBAL);
    // fprintf(stderr, "%s\n", dlerror());
    // if (dl != NULL) {
    //     dlsym(dl, "logger_create");
    //     dlclose(dl);
    // }

    metanet_start(&config);
    return 0;
}